<div class="table-responsive">
  <table class="show return-items-table table table-condensed table-bordered index">
    <thead>
      <tr>
        <th><%= Spree.t(:product) %></th>
        <th><%= Spree.t(:sku) %></th>
        <th><%= Spree.t(:pre_tax_amount) %></th>
        <th><%= Spree.t(:preferred_reimbursement_type) %></th>
        <th><%= Spree.t(:exchange_for) %></th>
        <th><%= Spree.t(:acceptance_errors) %></th>
        <% if show_decision %>
          <th></th>
        <% end %>
      </tr>
    </thead>
    <tbody>
      <% return_items.each do |return_item| %>
        <tr>
          <td>
            <div class="variant-name">
              <%= link_to return_item.inventory_unit.variant.name, spree.edit_admin_product_path(return_item.inventory_unit.variant.product) %>
            </div>
            <div class="variant-options"><%= return_item.inventory_unit.variant.options_text %></div>
          </td>
          <td>
            <%= return_item.inventory_unit.variant.sku %>
          </td>
          <td>
            <%= return_item.display_pre_tax_amount %>
          </td>
          <td>
            <%= reimbursement_type_name(return_item.preferred_reimbursement_type) %>
          </td>
          <td>
            <%= return_item.exchange_variant.try(:exchange_name) %>
          </td>
          <td>
            <%= return_item.acceptance_status_errors if return_item.acceptance_status_errors.present? %>
          </td>
          <% if show_decision %>
            <td class='actions actions-2'>
              <%= button_to [:admin, return_item], { class: 'with-tip display-inline btn btn-success btn-sm', params: { "return_item[acceptance_status]" => 'accepted' }, "data-action" => 'save', title: Spree.t(:accept), method: 'put' } do %>
                <%= Spree.t(:accept) %>
              <% end if can?(:accept, return_item) %>
              <%= button_to [:admin, return_item], { class: 'with-tip display-inline btn btn-danger btn-sm', params: { "return_item[acceptance_status]" => 'rejected' }, "data-action" => 'remove', title: Spree.t(:reject), method: 'put' } do %>
                <%= Spree.t(:reject) %>
              <% end if can?(:reject, return_item) %>
            </td>
          <% end %>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
